using System;

namespace PetShop.Web.Entities
{

	
	[Serializable]
	public class CartItemInfo {

	
	    public CartItemInfo(string itemId)
	    {
	        Quantity = 1;
	        InStock = false;
	        this.ItemId = itemId;
	    }

	    public CartItemInfo(string itemId, string name, bool inStock, int qty, decimal price) {
		
			this.ItemId = itemId;
			this.Name = name;
			this.Quantity = qty;
			this.Price = price;
			this.InStock = inStock;
		}

	    public int Quantity { get; set; }

	    public bool InStock { get; set; }

	    public decimal Subtotal {
			get { return (decimal)(this.Quantity * this.Price); }
		}

	    public string ItemId { get; private set; }

	    public string Name { get; private set; }

	    public decimal Price { get; private set; }
	}
}